﻿using System;
using System.ComponentModel.DataAnnotations;

namespace BanquetGift.Models
{
    /// <summary>
    /// 基础模型：
    /// 通用的属性写在这里，创建的模型可以集成这个对象，
    /// 从而获取基础模型种的属性
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class BaseModel<T>
    {
        /// <summary>
        /// 数据 ID
        /// </summary>
        [Key]
        [Display(Name = "数据 ID")]
        public T Id { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name = "创建人")]
        public int CreatedBy { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        [Display(Name = "创建日期")]
        public DateTime CreatedDateTime { get; set; } = DateTime.UtcNow.AddHours(8);
    }
}
